package object;


//封装 用private
public class Student {
    private int id;
    private String name;
    private int age;
    private String gender;
    private double score;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
    public void setGender(boolean isMmale){
        if (isMmale) {
            gender = "male";
        }
        else {
            gender = "female";
        }
    }

    public void doHomework(){
        System.out.println(name + "在做作业");
    }
    public void Study(){
        System.out.println(name + "在学习");
    }

}
